Skip to main content

State Reset Options API

The following document outlines the details of the State Reset Options API.

API Description

Objective

The State Reset Options API retrieves a list of modules from which a transaction can be reset. This functionality enables platform applications to provide users with the ability to reset a transaction to a specific point in their workflow journey.

InputOutput
Authentication headers and transaction detailsA list of available modules where the transaction can be reset to, including module names and identifiers

API URL

https://ind-state.idv.hyperverge.co/v2/state-reset/options

API Endpoint

state-reset/options

Overview

The State Reset Options API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should send all data in JSON format through a POST request.

Authentication

You need a unique pair of application ID ( appId ) and application key (appKey) from HyperVerge to verify your identity for accessing the State Reset Options API.

API Request Details

Method - POST

Headers

ParameterMandatory or OptionalDescriptionValid Values
appidMandatoryThe application ID shared by HyperVergeNot Applicable - this is a unique value
appkeyMandatoryThe application key shared by HyperVergeNot Applicable - this is a unique value
transactionidMandatoryThe unique transaction ID for the user journeyNot Applicable - this is a unique value
workflowidMandatoryThe unique workflow identifierNot Applicable - this is a unique value
authorizationOptionalBearer token for authentication (required if appKey not provided)Bearer token

Request

The following code snippet demonstrates a standard curl request for the State Reset Options API:

curl --location --request POST 'https://ind-state.idv.hyperverge.co/v2/state-reset/options' \
--header 'appid: <Enter_the_HyperVerge_appId>' \
--header 'appkey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionid: <Enter_the_transaction_ID>' \
--header 'workflowid: <Enter_the_workflow_ID>' \
--header 'authorization: Bearer <Enter_your_auth_token>'

Success Response

The following code snippet demonstrates a success response from the State Reset Options API:

{
"statusCode": 200,
"status": "success",
"result": {
"resetOptions": [
{
"moduleName": "<Module_Name>",
"moduleId": "<Module_ID>"
},
{
"moduleName": "<Module_Name>",
"moduleId": "<Module_ID>"
}
]
}
}

Success Response Details

The following table outlines the details of the success response from the State Reset Options API:

ParameterTypeDescription
statusCodenumberThe HTTP status code of the response
statusstringThe status of the request
result.resetOptionsarrayThe list of modules where the transaction can be reset to
result.resetOptions[].moduleNamestringThe display name of the module
result.resetOptions[].moduleIdstringThe unique identifier of the module

Error Responses

The following are some error responses from the State Reset Options API:

{
"statusCode": 400,
"status": "failure",
"errorCode": "cpr_not_enabled"
}
{
"statusCode": 401,
"status": "failure",
"error": "Invalid or missing authentication",
"errorCode": "unauthorized_access"
}

Error Response Details

A failure or error response from the module contains a failure status, with a relevant status code and error message.
The following table lists all error responses:

Status CodeError CodeError Description
400cpr_not_enabled The Cross Platform Resume (CPR) functionality is not enabled for this workflow
400dashboard_state_reset_not_enabledThe dashboard state reset functionality is not enabled for this workflow
400empty_execution_orderThe request contains no modules that have been executed in this transaction
400end_state_not_reachedThe transaction has not reached an end state
401unauthorized_accessThe request contains invalid or missing authentication credentials
404state_not_foundThe transaction state was not found or has expired
404workflow_not_foundThe specified workflow was not found in the system
500internal_server_errorPlease contact HyperVerge for investigation
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: